Skip to main content

group

Type

object

Summary

A control that contains other controls.

Syntax

group

Description

Use the group object type to hold sets of controls, radio-button clusters, menu bars, and controls to be displayed on more than one card.

A group is a set of controls that has been made into a single control. You can select, move, resize, or copy the group, and all the controls in it come with the group. You can show a border around the group (using its border property), a label (using the showName property), or scrollbars.

Groups can contain any type of control (including other nested groups).

When referring to a group using the synonyms background, bkgnd, or bg, the reference is to one among the groups in a stack, rather than to one among the groups on a card. For example, the object reference background 1 indicates the first group in the current stack, not the lowest-layered group on the current card.

Examples

set the showBorder of last group to true
create group "Options"

glossary: property, radio button, menu bar, object type, control

keyword: card, templateGroup

object: scrollbar

property: showName

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Associated Syntax

Message

NameSummarySyntax
preOpenControlSent to a group when you go to the card that contains it and to a background group when going from a card which it is not placed on to one where it is.preOpenControl
deleteBackgroundSent to a group just before it is removed from the stack.deleteBackground
scrollbarDragSent to a field, scrollbar, or group when the user drags the scrollbar thumb or when a text selection causes a field to scroll.scrollbarDrag <pNewPosition>
openControlSent to a group right after you go to the card that contains it or to a background group right after going from a card where it was is not placed on to one where it is.openControl
newBackgroundSent to a new group right after it's created.newBackground
openBackgroundSent to all background groups when a card they are placed on is opened.openBackground <pBackgroundID>
closeControlSent to a group when the user is leaving the card that contains it.closeControl
newGroupSent to a new group right after it's created.newGroup
preOpenBackgroundSent to the current card when you go from a card that does not have a group to a card that does.preOpenBackground <pBackgroundID>
deleteGroupSent to a group just before it is removed from the stack.deleteGroup

Command

NameSummarySyntax
ungroupMakes a group's objects into card objects, deleting the group.ungroup
stop editingTakes a stack out of group-editing mode.stop editing [<group> [of <stack>]]
placeAdds an existing group of objects to a card and sets the sharedBehavior property to true.place <group> onto <card>
start editingPuts a stack into group-editing mode.start editing <group> [of <stack>]
groupCreates a new **group** and adds the selected objects to it.group [<objectList>]
removeDeletes a group from a specified card.remove <group> from <card>

Property

NameSummarySyntax
topRightSpecifies the location of the specified object's upper right corner. set the topRight of <object> to <right>, <top>
formattedWidthReports the width needed by an object to display its full contents without scrolling.get the formattedWidth of <object> get the formattedWidth of [<chunk> of] <field>
cantDeleteSpecifies whether an object can be deleted.set the cantDelete of {<card> | <group> | <stack>} to {true | false}
borderColorSpecifies the color of an object's border.set the borderColor of <object> to {empty | <colorName> | <RGBColor>} set the borderColor of <line> of <field> to {empty | <colorName> | <RGBColor>}
hilitedButtonNameSpecifies which button in a group is currently highlighted. set the hilitedButtonName of <group> to <buttonName>
topMarginSpecifies how close text within an object can come to the object's upper edge, and how close objects in a group can come to the group's upper edge.set the topMargin of {<button> | <field> | <group>} to <pixels>
relayerGroupedControlsSpecifies whether you can change the layer of controls in a group even if not in group-editing mode.set the relayerGroupedControls to {true | false}
lockUpdatesWhen a control within a group is resized or moved it causes all parents to recalculate their bounds appropriately. The lockUpdates property of the group prevents this behavior.set the lockUpdates of <group> to {true | false}
topLeftSpecifies the location of the specified object's upper left corner. set the topLeft of <object> to left,top
rightSpecifies how far an object's right edge is from the left edge of the window or screen.set the right of <object> to <pixels>
focusPatternSpecifies the pattern used for an object's outline when it has the insertion point or is active focused.set the focusPattern of <object> to {<patternNumber> | <imageID> | empty}
topPatternSpecifies the pattern used to draw a three-D object's raised edge. set the topPattern of <object> to {<patternNumber> | <imageID> | empty}
foregroundColorSpecifies the color of object text and borders.set the foregroundColor of <object> to {empty | <colorName> | <RGBColor>} set the foregroundColor of [<chunk> of] <field> to {empty| <colorName> | <RGBColor>}
scrollbarWidthSpecifies the width of the scrollbar associated with a scrolling field or group.set the scrollbarWidth of {<field> | <group>} to <pixels>
selectGroupedControlsSpecifies whether clicking an object in a group selects the object or the entire group.set the selectGroupedControls to {true | false} set the selectGroupedControls of group <groupname> to {true | false}
shadowColorSpecifies the color of an object's drop shadow or the background of a scrollbar.set the shadowColor of <object> to {empty | <colorName> | <RGBColor>}
boundingRectSpecifies whether a group automatically changes size to fit when its controls are moved or resized.set the boundingRect of <group> to {<left>, <top>, <right>, <bottom> | empty }
defaultMenubarSpecifies which menu bar is displayed on Mac OS systems when the active window's menubar property is empty.set the defaultMenubar to <group>
formattedRectReports the rectangle that surrounds all the objects in a card or group.get the formattedRect of {<card> | <group>} get the formattedRect of <chunk> of <field>
enabledSpecifies that an object is active and responds to user action. set the enabled of <object> to {true | false}
backgroundColorSpecifies an object's background color.set the backgroundColor of <object> to {empty | <colorName> | <RGBColor>} set the backgroundColor [of <chunk>] [of <line>] of <field> to {empty| <colorName> | <RGBColor>}
hiliteColorSpecifies the color of the background when an object, or text in an object, is highlighted.set the hiliteColor [of <object>] to {empty | <colorName> | <RGBColor>}
childControlIDsReports the IDs of all the children of a group.get the childControlIDs of <group>
dontSearchSpecifies whether the find command skips a field, group, or card. set the dontSearch of <field> to {true | false}
vScrollSpecifies the vertical scroll of a field, group, or stack.set the vScroll of {<field> | <group>} to <pixels> get the scroll of <stack>
cardNamesLists the short name property of all the cards in a stack, or all the cards that contain a specified group.get the cardNames of {group | stack}
leftMarginSpecifies how close text within an object can come to the object's left edge, and how close objects in a group can come to the group's left edge.set the leftMargin of {<button> | <field> | <group>} to <pixels>
bottomPatternSpecifies the pattern of a three-D object's lowered edge.set the bottomPattern of <object> to {empty | <patternNumber> | <imageID>}
hilitePatternSpecifies the fill pattern used for the background when an object, or text in an object, is highlighted. set the hilitePattern of <object> to {<patternNumber> | <imageID> | empty}
shadowPatternSpecifies the pattern of an object's drop shadow.set the shadowPattern of <object> to {<patternNumber> | <imageID> | empty}
layerSpecifies the back-to-front order of objects on a card or the order of cards in a stack.set the layer of <object> to {<layerNumber> | top | bottom}
backgroundPatternThe **backgroundPattern** specifies the pattern used to draw an object's background.set the backgroundPattern of <object> to {<patternNumber> | <imageID> | empty}
unboundedHScrollSpecifies whether automatic clamping of the hScroll offsets of a group is on or off.set the unboundedHScroll of <group> to {true | false}
vScrollbarSpecifies whether a field or group has a vertical scrollbar.set the vScrollbar of {<field> | <group>} to {true | false}
topColorSpecifies the color of a three-D object's raised edge.set the topColor of <object> to {empty | <colorName> | <RGBColor>}
bottomSpecifies how far an object's bottom edge is from the top of the window or screen.set the bottom of <object> to <number>
borderPatternSpecifies the pattern of an object's border.set the borderPattern of <object> to {empty | <patternNumber> | <imageID>}
heightSpecifies the distance from an object's top edge to its bottom edge. set the height of <object> to <numberOfPixels>
backgroundBehaviorSpecifies whether a group behaves as a background and come after it's card on the message path.set the backgroundBehavior of <group> to {true | false}
traversalOnSpecifies whether a control can become the active (focused) control. set the traversalOn of <object> to {true | false}
hilitedButtonSpecifies which button in a group is currently highlighted. set the hilitedButton of <group> to <buttonNumber>
topSpecifies how far an object's top edge is from the top of the window or screen.set the top of <object> to <numberOfPixels>
clipsToRectSpecfies whether the rectangle of the group or the union of the rectangles of the child controls of the group governs the groups displayed rectangle.set the clipsToRect of <group> to {true | false}
bottomRightSpecifies the location of the specified object's lower right corner. set the bottomRight of <object> to right,bottom
hilitedButtonIDSpecifies which button in a group is currently highlighted. set the hilitedButtonID of <group> to <buttonID>
formattedLeftReports the distance between the left edge of the stack window and the leftmost object in a card or group.get the formattedLeft of {<group> | <card>} get the formattedLeft of <chunk> of <field>
backSizeSpecifies the width and height of the specified background.set the backSize of <group> to <width>, <height>
unboundedVScrollSpecifies whether automatic clamping of the vScroll offsets of a group is on or off.set the unboundedVScroll of <group> to {true | false}
locationSpecifies where an object is.set the location of <object> to <point>
leftSpecifies how far an object's left edge is from the left edge of the window or screen.set the left of <object> to <numberOfPixels>
disabledSpecifies that an object is dimmed and does not respond to user action.set the disabled of <object> to {true | false}
rightMarginSpecifies how close text within an object can come to the object's right edge, and how close objects in a group can come to the group's right edge.set the rightMargin of {<button> | <field> | <group>} to <pixels>
tabGroupBehaviorSpecifies whether the arrow keys navigate within a group and whether the Tab key skips to the next group.set the tabGroupBehavior of <group> to {true | false}
hScrollSpecifies the horizontal scroll of a field or group.set the hScroll of {<field> | <group>} to <pixels>
IDReports the unique ID number assigned to an object.set the ID of {image | stack} to <number> get the [{ long | abbreviated | short }] ID of <object>
hScrollbarSpecifies whether a field or group has a horizontal scrollbar.set the hScrollbar of {<field> | <group>} to {true | false}
radioBehaviorSpecifies that only one radio button in a group can be highlighted at a time.set the radioBehavior of <group> to {true | false}
formattedTopReports the distance between the top edge of the stack window and the topmost object in a card or group.get the formattedTop of {<card> | <group>} get the formattedTop of <chunk> of <field>
bottomColorSpecifies the color of a three-D object's lowered edge.set the bottomColor of <object> to {empty | <colorName> | <RGBColor>}
bottomMarginSpecifies how close text within an object can come to the object's lower edge, and how close objects in a group can come to the group's lower edge.set the bottomMargin of {<button> | <field> | <group>} to <pixels>
nameSpecifies the name of an object.set the [{ long | abbreviated | short }] name of <object> to <string> get the name
ownerReports which object is next in the object hierarchy.get the [{ long | abbreviated | short }] owner of <object>
showNameSpecifies whether an object's name is displayed within it.set the showName of {<button> | <graphic> | <group>} to {true | false}
formattedHeightReports the height needed by an object to display its full contents without scrolling.get the formattedHeight of <object> get the formattedHeight of [<chunk> of] <field>
focusColorSpecifies the color of the outline around the active control or the field with the insertion point.set the focusColor of <object> to {empty | <colorName> | <RGBColor>}
foregroundPatternSpecifies the pattern used for object text and borders.set the foregroundPattern of <object> to {<patternNumber> | <imageID> | empty} set the foregroundPattern of [<chunk> of] <field> to {<patternNumber> | <imageID> | empty}
childControlNamesReports the names of all the children of a group.get the childControlNames of <group>
Thank you for your feedback!

Was this page helpful?